Skip to main content

All Questions

1vote
0answers
59views

Two replacements in one go [duplicate]

How do I go about replacing one character for another and then another character for another in one line and printing the result? As an example, consider the following code: string="1 33 4 a" echo ${...
2r3plac3's user avatar
0votes
3answers
98views

How to replace a number by its corresponding string (low/high) in bash?

I have a file: property(Address1, 4.5) property(Address2, 2.2) property(Address3, 9.0) property(Address4, 3.4) --- I want to replace the floating points based on some conditions (For example: if the ...
Coder's user avatar
6votes
4answers
2kviews

sed how to substitute when string has "http://" in it?

I have a file xx that has the following contents: @base_url = "http://dmstaffing-stage.herokuapp.com/" I want to use sed to eliminate this line (replace with nothing). I have used this sed technique ...
Michael Durrant's user avatar

close